package com.bilibili.demo;
//父类
//lombok技术可以实现为类自动添加getter setter方法无参数构造器，toString方法等。
//@Data(下载不了)
public class Card {
    private String carID;
    private String name;
    private String phone;
    private double money;
    public Card() {}
    public Card(String carID,String name,String phone,double money){
        this.carID=carID;
        this.name=name;
        this.phone=phone;
        this.money=money;
    }

    public void cunqian(double money){
        this.money += money;
    }
    public void huaqian(double money){
        this.money -= money;
    }


    public String getCarID() {
        return carID;
    }

    public void setCarID(String carID) {
        this.carID = carID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }
}
